

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="Description" content="scikit-learn: machine learning in Python">

  
  <title>Version 0.18.2 &mdash; scikit-learn 0.22 documentation</title>
  
  <link rel="canonical" href="http://scikit-learn.org/stable/whats_new/v0.18.html" />

  
  <link rel="shortcut icon" href="../_static/favicon.ico"/>
  

  <link rel="stylesheet" href="../_static/css/vendor/bootstrap.min.css" type="text/css" />
  <link rel="stylesheet" href="../_static/gallery.css" type="text/css" />
  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script> 
</head>
<body>
<nav id="navbar" class="sk-docs-navbar navbar navbar-expand-md navbar-light bg-light py-0">
  <div class="container-fluid sk-docs-container px-0">
      <a class="navbar-brand py-0" href="../index.html">
        <img
          class="sk-brand-img"
          src="../_static/scikit-learn-logo-small.png"
          alt="logo"/>
      </a>
    <button
      id="sk-navbar-toggler"
      class="navbar-toggler"
      type="button"
      data-toggle="collapse"
      data-target="#navbarSupportedContent"
      aria-controls="navbarSupportedContent"
      aria-expanded="false"
      aria-label="Toggle navigation"
    >
      <span class="navbar-toggler-icon"></span>
    </button>

    <div class="sk-navbar-collapse collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav mr-auto">
        <li class="nav-item">
          <a class="sk-nav-link nav-link" href="../install.html">Install</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link" href="../user_guide.html">User Guide</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link" href="../modules/classes.html">API</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link" href="../auto_examples/index.html">Examples</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../getting_started.html">Getting Started</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../tutorial/index.html">Tutorial</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../glossary.html">Glossary</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../developers/index.html">Development</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../faq.html">FAQ</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../related_projects.html">Related packages</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../roadmap.html">Roadmap</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../about.html">About us</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="https://github.com/scikit-learn/scikit-learn">GitHub</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="https://scikit-learn.org/dev/versions.html">Other Versions</a>
        </li>
        <li class="nav-item dropdown nav-more-item-dropdown">
          <a class="sk-nav-link nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">More</a>
          <div class="dropdown-menu" aria-labelledby="navbarDropdown">
              <a class="sk-nav-dropdown-item dropdown-item" href="../getting_started.html">Getting Started</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../tutorial/index.html">Tutorial</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../glossary.html">Glossary</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../developers/index.html">Development</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../faq.html">FAQ</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../related_projects.html">Related packages</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../roadmap.html">Roadmap</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../about.html">About us</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="https://github.com/scikit-learn/scikit-learn">GitHub</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="https://scikit-learn.org/dev/versions.html">Other Versions</a>
          </div>
        </li>
      </ul>
      <div id="searchbox" role="search">
          <div class="searchformwrapper">
          <form class="search" action="../search.html" method="get">
            <input class="sk-search-text-input" type="text" name="q" aria-labelledby="searchlabel" />
            <input class="sk-search-text-btn" type="submit" value="Go" />
          </form>
          </div>
      </div>
    </div>
  </div>
</nav>
<div class="d-flex" id="sk-doc-wrapper">
    <input type="checkbox" name="sk-toggle-checkbox" id="sk-toggle-checkbox">
    <label id="sk-sidemenu-toggle" class="sk-btn-toggle-toc btn sk-btn-primary" for="sk-toggle-checkbox">Toggle Menu</label>
    <div id="sk-sidebar-wrapper" class="border-right">
      <div class="sk-sidebar-toc-wrapper">
        <div class="sk-sidebar-toc-logo">
          <a href="../index.html">
            <img
              class="sk-brand-img"
              src="../_static/scikit-learn-logo-small.png"
              alt="logo"/>
          </a>
        </div>
        <div class="btn-group w-100 mb-2" role="group" aria-label="rellinks">
            <a href="v0.19.html" role="button" class="btn sk-btn-rellink py-1" sk-rellink-tooltip="Version 0.19.2">Prev</a><a href="../whats_new.html" role="button" class="btn sk-btn-rellink py-1" sk-rellink-tooltip="Release History">Up</a>
            <a href="v0.17.html" role="button" class="btn sk-btn-rellink py-1" sk-rellink-tooltip="Version 0.17.1">Next</a>
        </div>
        <div class="alert alert-danger p-1 mb-2" role="alert">
          <p class="text-center mb-0">
          <strong>scikit-learn 0.22</strong><br/>
          <a href="http://scikit-learn.org/dev/versions.html">Other versions</a>
          </p>
        </div>
        <div class="alert alert-warning p-1 mb-2" role="alert">
          <p class="text-center mb-0">
            Please <a class="font-weight-bold" href="../about.html#citing-scikit-learn"><string>cite us</string></a> if you use the software.
          </p>
        </div>
          <div class="sk-sidebar-toc">
            <ul>
<li><a class="reference internal" href="#">Version 0.18.2</a><ul>
<li><a class="reference internal" href="#changelog">Changelog</a></li>
<li><a class="reference internal" href="#code-contributors">Code Contributors</a></li>
</ul>
</li>
<li><a class="reference internal" href="#version-0-18-1">Version 0.18.1</a><ul>
<li><a class="reference internal" href="#id1">Changelog</a><ul>
<li><a class="reference internal" href="#enhancements">Enhancements</a></li>
<li><a class="reference internal" href="#bug-fixes">Bug fixes</a></li>
</ul>
</li>
<li><a class="reference internal" href="#api-changes-summary">API changes summary</a></li>
</ul>
</li>
<li><a class="reference internal" href="#version-0-18">Version 0.18</a><ul>
<li><a class="reference internal" href="#model-selection-enhancements-and-api-changes">Model Selection Enhancements and API Changes</a></li>
<li><a class="reference internal" href="#id2">Changelog</a><ul>
<li><a class="reference internal" href="#new-features">New features</a></li>
<li><a class="reference internal" href="#id3">Enhancements</a></li>
<li><a class="reference internal" href="#id4">Bug fixes</a></li>
</ul>
</li>
<li><a class="reference internal" href="#id5">API changes summary</a></li>
<li><a class="reference internal" href="#id6">Code Contributors</a></li>
</ul>
</li>
</ul>

          </div>
      </div>
    </div>
    <div id="sk-page-content-wrapper">
      <div class="sk-page-content container-fluid body px-md-3" role="main">
        
  <div class="section" id="version-0-18-2">
<span id="changes-0-18-2"></span><h1>Version 0.18.2<a class="headerlink" href="#version-0-18-2" title="Permalink to this headline">¶</a></h1>
<p><strong>June 20, 2017</strong></p>
<div class="topic">
<p class="topic-title">Last release with Python 2.6 support</p>
<p>Scikit-learn 0.18 is the last major release of scikit-learn to support Python 2.6.
Later versions of scikit-learn will require Python 2.7 or above.</p>
</div>
<div class="section" id="changelog">
<h2>Changelog<a class="headerlink" href="#changelog" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><p>Fixes for compatibility with NumPy 1.13.0: <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7946">#7946</a> <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/8355">#8355</a> by
<a class="reference external" href="https://github.com/lesteve">Loic Esteve</a>.</p></li>
<li><p>Minor compatibility changes in the examples <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9010">#9010</a> <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/8040">#8040</a>
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9149">#9149</a>.</p></li>
</ul>
</div>
<div class="section" id="code-contributors">
<h2>Code Contributors<a class="headerlink" href="#code-contributors" title="Permalink to this headline">¶</a></h2>
<p>Aman Dalmia, Loic Esteve, Nate Guerin, Sergei Lebedev</p>
</div>
</div>
<div class="section" id="version-0-18-1">
<span id="changes-0-18-1"></span><h1>Version 0.18.1<a class="headerlink" href="#version-0-18-1" title="Permalink to this headline">¶</a></h1>
<p><strong>November 11, 2016</strong></p>
<div class="section" id="id1">
<h2>Changelog<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
<div class="section" id="enhancements">
<h3>Enhancements<a class="headerlink" href="#enhancements" title="Permalink to this headline">¶</a></h3>
<ul>
<li><p>Improved <code class="docutils literal notranslate"><span class="pre">sample_without_replacement</span></code> speed by utilizing
numpy.random.permutation for most cases. As a result,
samples may differ in this release for a fixed random state.
Affected estimators:</p>
<ul class="simple">
<li><p><a class="reference internal" href="../modules/generated/sklearn.ensemble.BaggingClassifier.html#sklearn.ensemble.BaggingClassifier" title="sklearn.ensemble.BaggingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.BaggingClassifier</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.ensemble.BaggingRegressor.html#sklearn.ensemble.BaggingRegressor" title="sklearn.ensemble.BaggingRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.BaggingRegressor</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.linear_model.RANSACRegressor.html#sklearn.linear_model.RANSACRegressor" title="sklearn.linear_model.RANSACRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.RANSACRegressor</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.model_selection.RandomizedSearchCV.html#sklearn.model_selection.RandomizedSearchCV" title="sklearn.model_selection.RandomizedSearchCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.RandomizedSearchCV</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.random_projection.SparseRandomProjection.html#sklearn.random_projection.SparseRandomProjection" title="sklearn.random_projection.SparseRandomProjection"><code class="xref py py-class docutils literal notranslate"><span class="pre">random_projection.SparseRandomProjection</span></code></a></p></li>
</ul>
<p>This also affects the <a class="reference internal" href="../modules/generated/sklearn.datasets.make_classification.html#sklearn.datasets.make_classification" title="sklearn.datasets.make_classification"><code class="xref py py-meth docutils literal notranslate"><span class="pre">datasets.make_classification</span></code></a>
method.</p>
</li>
</ul>
</div>
<div class="section" id="bug-fixes">
<h3>Bug fixes<a class="headerlink" href="#bug-fixes" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p>Fix issue where <code class="docutils literal notranslate"><span class="pre">min_grad_norm</span></code> and <code class="docutils literal notranslate"><span class="pre">n_iter_without_progress</span></code>
parameters were not being utilised by <a class="reference internal" href="../modules/generated/sklearn.manifold.TSNE.html#sklearn.manifold.TSNE" title="sklearn.manifold.TSNE"><code class="xref py py-class docutils literal notranslate"><span class="pre">manifold.TSNE</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/6497">#6497</a> by <a class="reference external" href="https://github.com/ssaeger">Sebastian Säger</a></p></li>
<li><p>Fix bug for svm’s decision values when <code class="docutils literal notranslate"><span class="pre">decision_function_shape</span></code>
is <code class="docutils literal notranslate"><span class="pre">ovr</span></code> in <a class="reference internal" href="../modules/generated/sklearn.svm.SVC.html#sklearn.svm.SVC" title="sklearn.svm.SVC"><code class="xref py py-class docutils literal notranslate"><span class="pre">svm.SVC</span></code></a>.
<a class="reference internal" href="../modules/generated/sklearn.svm.SVC.html#sklearn.svm.SVC" title="sklearn.svm.SVC"><code class="xref py py-class docutils literal notranslate"><span class="pre">svm.SVC</span></code></a>’s decision_function was incorrect from versions
0.17.0 through 0.18.0.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7724">#7724</a> by <a class="reference external" href="https://github.com/btdai">Bing Tian Dai</a></p></li>
<li><p>Attribute <code class="docutils literal notranslate"><span class="pre">explained_variance_ratio</span></code> of
<a class="reference internal" href="../modules/generated/sklearn.discriminant_analysis.LinearDiscriminantAnalysis.html#sklearn.discriminant_analysis.LinearDiscriminantAnalysis" title="sklearn.discriminant_analysis.LinearDiscriminantAnalysis"><code class="xref py py-class docutils literal notranslate"><span class="pre">discriminant_analysis.LinearDiscriminantAnalysis</span></code></a> calculated
with SVD and Eigen solver are now of the same length. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7632">#7632</a>
by <a class="reference external" href="https://github.com/JPFrancoia">JPFrancoia</a></p></li>
<li><p>Fixes issue in <a class="reference internal" href="../modules/feature_selection.html#univariate-feature-selection"><span class="std std-ref">Univariate feature selection</span></a> where score
functions were not accepting multi-label targets. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7676">#7676</a>
by <a class="reference external" href="https://github.com/affanv14">Mohammed Affan</a></p></li>
<li><p>Fixed setting parameters when calling <code class="docutils literal notranslate"><span class="pre">fit</span></code> multiple times on
<a class="reference internal" href="../modules/generated/sklearn.feature_selection.SelectFromModel.html#sklearn.feature_selection.SelectFromModel" title="sklearn.feature_selection.SelectFromModel"><code class="xref py py-class docutils literal notranslate"><span class="pre">feature_selection.SelectFromModel</span></code></a>. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7756">#7756</a> by <a class="reference external" href="https://amueller.github.io/">Andreas Müller</a></p></li>
<li><p>Fixes issue in <code class="docutils literal notranslate"><span class="pre">partial_fit</span></code> method of
<a class="reference internal" href="../modules/generated/sklearn.multiclass.OneVsRestClassifier.html#sklearn.multiclass.OneVsRestClassifier" title="sklearn.multiclass.OneVsRestClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">multiclass.OneVsRestClassifier</span></code></a> when number of classes used in
<code class="docutils literal notranslate"><span class="pre">partial_fit</span></code> was less than the total number of classes in the
data. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7786">#7786</a> by <a class="reference external" href="https://github.com/srivatsan-ramesh">Srivatsan Ramesh</a></p></li>
<li><p>Fixes issue in <a class="reference internal" href="../modules/generated/sklearn.calibration.CalibratedClassifierCV.html#sklearn.calibration.CalibratedClassifierCV" title="sklearn.calibration.CalibratedClassifierCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">calibration.CalibratedClassifierCV</span></code></a> where
the sum of probabilities of each class for a data was not 1, and
<code class="docutils literal notranslate"><span class="pre">CalibratedClassifierCV</span></code> now handles the case where the training set
has less number of classes than the total data. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7799">#7799</a> by
<a class="reference external" href="https://github.com/srivatsan-ramesh">Srivatsan Ramesh</a></p></li>
<li><p>Fix a bug where <a class="reference internal" href="../modules/generated/sklearn.feature_selection.SelectFdr.html#sklearn.feature_selection.SelectFdr" title="sklearn.feature_selection.SelectFdr"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.feature_selection.SelectFdr</span></code></a> did not
exactly implement Benjamini-Hochberg procedure. It formerly may have
selected fewer features than it should.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7490">#7490</a> by <a class="reference external" href="https://github.com/mpjlu">Peng Meng</a>.</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.manifold.LocallyLinearEmbedding.html#sklearn.manifold.LocallyLinearEmbedding" title="sklearn.manifold.LocallyLinearEmbedding"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.manifold.LocallyLinearEmbedding</span></code></a> now correctly handles
integer inputs. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/6282">#6282</a> by <a class="reference external" href="https://staff.washington.edu/jakevdp/">Jake Vanderplas</a>.</p></li>
<li><p>The <code class="docutils literal notranslate"><span class="pre">min_weight_fraction_leaf</span></code> parameter of tree-based classifiers and
regressors now assumes uniform sample weights by default if the
<code class="docutils literal notranslate"><span class="pre">sample_weight</span></code> argument is not passed to the <code class="docutils literal notranslate"><span class="pre">fit</span></code> function.
Previously, the parameter was silently ignored. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7301">#7301</a>
by <a class="reference external" href="https://github.com/nelson-liu">Nelson Liu</a>.</p></li>
<li><p>Numerical issue with <a class="reference internal" href="../modules/generated/sklearn.linear_model.RidgeCV.html#sklearn.linear_model.RidgeCV" title="sklearn.linear_model.RidgeCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.RidgeCV</span></code></a> on centered data when
<code class="docutils literal notranslate"><span class="pre">n_features</span> <span class="pre">&gt;</span> <span class="pre">n_samples</span></code>. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/6178">#6178</a> by <a class="reference external" href="https://team.inria.fr/parietal/bertrand-thirions-page">Bertrand Thirion</a></p></li>
<li><p>Tree splitting criterion classes’ cloning/pickling is now memory safe
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7680">#7680</a> by <a class="reference external" href="https://github.com/olologin">Ibraim Ganiev</a>.</p></li>
<li><p>Fixed a bug where <a class="reference internal" href="../modules/generated/sklearn.decomposition.NMF.html#sklearn.decomposition.NMF" title="sklearn.decomposition.NMF"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.NMF</span></code></a> sets its <code class="docutils literal notranslate"><span class="pre">n_iters_</span></code>
attribute in <code class="docutils literal notranslate"><span class="pre">transform()</span></code>. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7553">#7553</a> by <a class="reference external" href="https://github.com/kiote">Ekaterina
Krivich</a>.</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegressionCV.html#sklearn.linear_model.LogisticRegressionCV" title="sklearn.linear_model.LogisticRegressionCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.linear_model.LogisticRegressionCV</span></code></a> now correctly handles
string labels. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/5874">#5874</a> by <a class="reference external" href="https://github.com/raghavrv">Raghav RV</a>.</p></li>
<li><p>Fixed a bug where <a class="reference internal" href="../modules/generated/sklearn.model_selection.train_test_split.html#sklearn.model_selection.train_test_split" title="sklearn.model_selection.train_test_split"><code class="xref py py-func docutils literal notranslate"><span class="pre">sklearn.model_selection.train_test_split</span></code></a> raised
an error when <code class="docutils literal notranslate"><span class="pre">stratify</span></code> is a list of string labels. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7593">#7593</a> by
<a class="reference external" href="https://github.com/raghavrv">Raghav RV</a>.</p></li>
<li><p>Fixed a bug where <a class="reference internal" href="../modules/generated/sklearn.model_selection.GridSearchCV.html#sklearn.model_selection.GridSearchCV" title="sklearn.model_selection.GridSearchCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.model_selection.GridSearchCV</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.model_selection.RandomizedSearchCV.html#sklearn.model_selection.RandomizedSearchCV" title="sklearn.model_selection.RandomizedSearchCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.model_selection.RandomizedSearchCV</span></code></a> were not pickleable
because of a pickling bug in <code class="docutils literal notranslate"><span class="pre">np.ma.MaskedArray</span></code>. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7594">#7594</a> by
<a class="reference external" href="https://github.com/raghavrv">Raghav RV</a>.</p></li>
<li><p>All cross-validation utilities in <a class="reference internal" href="../modules/classes.html#module-sklearn.model_selection" title="sklearn.model_selection"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.model_selection</span></code></a> now
permit one time cross-validation splitters for the <code class="docutils literal notranslate"><span class="pre">cv</span></code> parameter. Also
non-deterministic cross-validation splitters (where multiple calls to
<code class="docutils literal notranslate"><span class="pre">split</span></code> produce dissimilar splits) can be used as <code class="docutils literal notranslate"><span class="pre">cv</span></code> parameter.
The <a class="reference internal" href="../modules/generated/sklearn.model_selection.GridSearchCV.html#sklearn.model_selection.GridSearchCV" title="sklearn.model_selection.GridSearchCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.model_selection.GridSearchCV</span></code></a> will cross-validate each
parameter setting on the split produced by the first <code class="docutils literal notranslate"><span class="pre">split</span></code> call
to the cross-validation splitter.  <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7660">#7660</a> by <a class="reference external" href="https://github.com/raghavrv">Raghav RV</a>.</p></li>
<li><p>Fix bug where <a class="reference internal" href="../modules/generated/sklearn.preprocessing.MultiLabelBinarizer.html#sklearn.preprocessing.MultiLabelBinarizer.fit_transform" title="sklearn.preprocessing.MultiLabelBinarizer.fit_transform"><code class="xref py py-meth docutils literal notranslate"><span class="pre">preprocessing.MultiLabelBinarizer.fit_transform</span></code></a>
returned an invalid CSR matrix.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7750">#7750</a> by <a class="reference external" href="https://github.com/perimosocordiae">CJ Carey</a>.</p></li>
<li><p>Fixed a bug where <a class="reference internal" href="../modules/generated/sklearn.metrics.pairwise.cosine_distances.html#sklearn.metrics.pairwise.cosine_distances" title="sklearn.metrics.pairwise.cosine_distances"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.pairwise.cosine_distances</span></code></a> could return a
small negative distance. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7732">#7732</a> by <a class="reference external" href="https://github.com/asanakoy">Artsion</a>.</p></li>
</ul>
</div>
</div>
<div class="section" id="api-changes-summary">
<h2>API changes summary<a class="headerlink" href="#api-changes-summary" title="Permalink to this headline">¶</a></h2>
<p>Trees and forests</p>
<ul class="simple">
<li><p>The <code class="docutils literal notranslate"><span class="pre">min_weight_fraction_leaf</span></code> parameter of tree-based classifiers and
regressors now assumes uniform sample weights by default if the
<code class="docutils literal notranslate"><span class="pre">sample_weight</span></code> argument is not passed to the <code class="docutils literal notranslate"><span class="pre">fit</span></code> function.
Previously, the parameter was silently ignored. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7301">#7301</a> by <a class="reference external" href="https://github.com/nelson-liu">Nelson
Liu</a>.</p></li>
<li><p>Tree splitting criterion classes’ cloning/pickling is now memory safe.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7680">#7680</a> by <a class="reference external" href="https://github.com/olologin">Ibraim Ganiev</a>.</p></li>
</ul>
<p>Linear, kernelized and related models</p>
<ul class="simple">
<li><p>Length of <code class="docutils literal notranslate"><span class="pre">explained_variance_ratio</span></code> of
<a class="reference internal" href="../modules/generated/sklearn.discriminant_analysis.LinearDiscriminantAnalysis.html#sklearn.discriminant_analysis.LinearDiscriminantAnalysis" title="sklearn.discriminant_analysis.LinearDiscriminantAnalysis"><code class="xref py py-class docutils literal notranslate"><span class="pre">discriminant_analysis.LinearDiscriminantAnalysis</span></code></a>
changed for both Eigen and SVD solvers. The attribute has now a length
of min(n_components, n_classes - 1). <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7632">#7632</a>
by <a class="reference external" href="https://github.com/JPFrancoia">JPFrancoia</a></p></li>
<li><p>Numerical issue with <a class="reference internal" href="../modules/generated/sklearn.linear_model.RidgeCV.html#sklearn.linear_model.RidgeCV" title="sklearn.linear_model.RidgeCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.RidgeCV</span></code></a> on centered data when
<code class="docutils literal notranslate"><span class="pre">n_features</span> <span class="pre">&gt;</span> <span class="pre">n_samples</span></code>. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/6178">#6178</a> by <a class="reference external" href="https://team.inria.fr/parietal/bertrand-thirions-page">Bertrand Thirion</a></p></li>
</ul>
</div>
</div>
<div class="section" id="version-0-18">
<span id="changes-0-18"></span><h1>Version 0.18<a class="headerlink" href="#version-0-18" title="Permalink to this headline">¶</a></h1>
<p><strong>September 28, 2016</strong></p>
<div class="topic">
<p class="topic-title">Last release with Python 2.6 support</p>
<p>Scikit-learn 0.18 will be the last version of scikit-learn to support Python 2.6.
Later versions of scikit-learn will require Python 2.7 or above.</p>
</div>
<div class="section" id="model-selection-enhancements-and-api-changes">
<span id="model-selection-changes"></span><h2>Model Selection Enhancements and API Changes<a class="headerlink" href="#model-selection-enhancements-and-api-changes" title="Permalink to this headline">¶</a></h2>
<ul>
<li><p><strong>The model_selection module</strong></p>
<p>The new module <a class="reference internal" href="../modules/classes.html#module-sklearn.model_selection" title="sklearn.model_selection"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.model_selection</span></code></a>, which groups together the
functionalities of formerly <code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.cross_validation</span></code>,
<code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.grid_search</span></code> and <code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.learning_curve</span></code>, introduces new
possibilities such as nested cross-validation and better manipulation of
parameter searches with Pandas.</p>
<p>Many things will stay the same but there are some key differences. Read
below to know more about the changes.</p>
</li>
<li><p><strong>Data-independent CV splitters enabling nested cross-validation</strong></p>
<p>The new cross-validation splitters, defined in the
<a class="reference internal" href="../modules/classes.html#module-sklearn.model_selection" title="sklearn.model_selection"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.model_selection</span></code></a>, are no longer initialized with any
data-dependent parameters such as <code class="docutils literal notranslate"><span class="pre">y</span></code>. Instead they expose a
<code class="xref py py-func docutils literal notranslate"><span class="pre">split</span></code> method that takes in the data and yields a generator for the
different splits.</p>
<p>This change makes it possible to use the cross-validation splitters to
perform nested cross-validation, facilitated by
<a class="reference internal" href="../modules/generated/sklearn.model_selection.GridSearchCV.html#sklearn.model_selection.GridSearchCV" title="sklearn.model_selection.GridSearchCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.GridSearchCV</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.model_selection.RandomizedSearchCV.html#sklearn.model_selection.RandomizedSearchCV" title="sklearn.model_selection.RandomizedSearchCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.RandomizedSearchCV</span></code></a> utilities.</p>
</li>
<li><p><strong>The enhanced cv_results_ attribute</strong></p>
<p>The new <code class="docutils literal notranslate"><span class="pre">cv_results_</span></code> attribute (of <a class="reference internal" href="../modules/generated/sklearn.model_selection.GridSearchCV.html#sklearn.model_selection.GridSearchCV" title="sklearn.model_selection.GridSearchCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.GridSearchCV</span></code></a>
and <a class="reference internal" href="../modules/generated/sklearn.model_selection.RandomizedSearchCV.html#sklearn.model_selection.RandomizedSearchCV" title="sklearn.model_selection.RandomizedSearchCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.RandomizedSearchCV</span></code></a>) introduced in lieu of the
<code class="docutils literal notranslate"><span class="pre">grid_scores_</span></code> attribute is a dict of 1D arrays with elements in each
array corresponding to the parameter settings (i.e. search candidates).</p>
<p>The <code class="docutils literal notranslate"><span class="pre">cv_results_</span></code> dict can be easily imported into <code class="docutils literal notranslate"><span class="pre">pandas</span></code> as a
<code class="docutils literal notranslate"><span class="pre">DataFrame</span></code> for exploring the search results.</p>
<p>The <code class="docutils literal notranslate"><span class="pre">cv_results_</span></code> arrays include scores for each cross-validation split
(with keys such as <code class="docutils literal notranslate"><span class="pre">'split0_test_score'</span></code>), as well as their mean
(<code class="docutils literal notranslate"><span class="pre">'mean_test_score'</span></code>) and standard deviation (<code class="docutils literal notranslate"><span class="pre">'std_test_score'</span></code>).</p>
<p>The ranks for the search candidates (based on their mean
cross-validation score) is available at <code class="docutils literal notranslate"><span class="pre">cv_results_['rank_test_score']</span></code>.</p>
<p>The parameter values for each parameter is stored separately as numpy
masked object arrays. The value, for that search candidate, is masked if
the corresponding parameter is not applicable. Additionally a list of all
the parameter dicts are stored at <code class="docutils literal notranslate"><span class="pre">cv_results_['params']</span></code>.</p>
</li>
<li><p><strong>Parameters n_folds and n_iter renamed to n_splits</strong></p>
<p>Some parameter names have changed:
The <code class="docutils literal notranslate"><span class="pre">n_folds</span></code> parameter in new <a class="reference internal" href="../modules/generated/sklearn.model_selection.KFold.html#sklearn.model_selection.KFold" title="sklearn.model_selection.KFold"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.KFold</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.model_selection.GroupKFold.html#sklearn.model_selection.GroupKFold" title="sklearn.model_selection.GroupKFold"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.GroupKFold</span></code></a> (see below for the name change),
and <a class="reference internal" href="../modules/generated/sklearn.model_selection.StratifiedKFold.html#sklearn.model_selection.StratifiedKFold" title="sklearn.model_selection.StratifiedKFold"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.StratifiedKFold</span></code></a> is now renamed to
<code class="docutils literal notranslate"><span class="pre">n_splits</span></code>. The <code class="docutils literal notranslate"><span class="pre">n_iter</span></code> parameter in
<a class="reference internal" href="../modules/generated/sklearn.model_selection.ShuffleSplit.html#sklearn.model_selection.ShuffleSplit" title="sklearn.model_selection.ShuffleSplit"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.ShuffleSplit</span></code></a>, the new class
<a class="reference internal" href="../modules/generated/sklearn.model_selection.GroupShuffleSplit.html#sklearn.model_selection.GroupShuffleSplit" title="sklearn.model_selection.GroupShuffleSplit"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.GroupShuffleSplit</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.model_selection.StratifiedShuffleSplit.html#sklearn.model_selection.StratifiedShuffleSplit" title="sklearn.model_selection.StratifiedShuffleSplit"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.StratifiedShuffleSplit</span></code></a> is now renamed to
<code class="docutils literal notranslate"><span class="pre">n_splits</span></code>.</p>
</li>
<li><p><strong>Rename of splitter classes which accepts group labels along with data</strong></p>
<p>The cross-validation splitters <code class="docutils literal notranslate"><span class="pre">LabelKFold</span></code>,
<code class="docutils literal notranslate"><span class="pre">LabelShuffleSplit</span></code>, <code class="docutils literal notranslate"><span class="pre">LeaveOneLabelOut</span></code> and <code class="docutils literal notranslate"><span class="pre">LeavePLabelOut</span></code> have
been renamed to <a class="reference internal" href="../modules/generated/sklearn.model_selection.GroupKFold.html#sklearn.model_selection.GroupKFold" title="sklearn.model_selection.GroupKFold"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.GroupKFold</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.model_selection.GroupShuffleSplit.html#sklearn.model_selection.GroupShuffleSplit" title="sklearn.model_selection.GroupShuffleSplit"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.GroupShuffleSplit</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.model_selection.LeaveOneGroupOut.html#sklearn.model_selection.LeaveOneGroupOut" title="sklearn.model_selection.LeaveOneGroupOut"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.LeaveOneGroupOut</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.model_selection.LeavePGroupsOut.html#sklearn.model_selection.LeavePGroupsOut" title="sklearn.model_selection.LeavePGroupsOut"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.LeavePGroupsOut</span></code></a> respectively.</p>
<p>Note the change from singular to plural form in
<a class="reference internal" href="../modules/generated/sklearn.model_selection.LeavePGroupsOut.html#sklearn.model_selection.LeavePGroupsOut" title="sklearn.model_selection.LeavePGroupsOut"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.LeavePGroupsOut</span></code></a>.</p>
</li>
<li><p><strong>Fit parameter labels renamed to groups</strong></p>
<p>The <code class="docutils literal notranslate"><span class="pre">labels</span></code> parameter in the <code class="xref py py-func docutils literal notranslate"><span class="pre">split</span></code> method of the newly renamed
splitters <a class="reference internal" href="../modules/generated/sklearn.model_selection.GroupKFold.html#sklearn.model_selection.GroupKFold" title="sklearn.model_selection.GroupKFold"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.GroupKFold</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.model_selection.LeaveOneGroupOut.html#sklearn.model_selection.LeaveOneGroupOut" title="sklearn.model_selection.LeaveOneGroupOut"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.LeaveOneGroupOut</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.model_selection.LeavePGroupsOut.html#sklearn.model_selection.LeavePGroupsOut" title="sklearn.model_selection.LeavePGroupsOut"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.LeavePGroupsOut</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.model_selection.GroupShuffleSplit.html#sklearn.model_selection.GroupShuffleSplit" title="sklearn.model_selection.GroupShuffleSplit"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.GroupShuffleSplit</span></code></a> is renamed to <code class="docutils literal notranslate"><span class="pre">groups</span></code>
following the new nomenclature of their class names.</p>
</li>
<li><p><strong>Parameter n_labels renamed to n_groups</strong></p>
<p>The parameter <code class="docutils literal notranslate"><span class="pre">n_labels</span></code> in the newly renamed
<a class="reference internal" href="../modules/generated/sklearn.model_selection.LeavePGroupsOut.html#sklearn.model_selection.LeavePGroupsOut" title="sklearn.model_selection.LeavePGroupsOut"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.LeavePGroupsOut</span></code></a> is changed to <code class="docutils literal notranslate"><span class="pre">n_groups</span></code>.</p>
</li>
<li><p>Training scores and Timing information</p>
<p><code class="docutils literal notranslate"><span class="pre">cv_results_</span></code> also includes the training scores for each
cross-validation split (with keys such as <code class="docutils literal notranslate"><span class="pre">'split0_train_score'</span></code>), as
well as their mean (<code class="docutils literal notranslate"><span class="pre">'mean_train_score'</span></code>) and standard deviation
(<code class="docutils literal notranslate"><span class="pre">'std_train_score'</span></code>). To avoid the cost of evaluating training score,
set <code class="docutils literal notranslate"><span class="pre">return_train_score=False</span></code>.</p>
<p>Additionally the mean and standard deviation of the times taken to split,
train and score the model across all the cross-validation splits is
available at the key <code class="docutils literal notranslate"><span class="pre">'mean_time'</span></code> and <code class="docutils literal notranslate"><span class="pre">'std_time'</span></code> respectively.</p>
</li>
</ul>
</div>
<div class="section" id="id2">
<h2>Changelog<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h2>
<div class="section" id="new-features">
<h3>New features<a class="headerlink" href="#new-features" title="Permalink to this headline">¶</a></h3>
<p>Classifiers and Regressors</p>
<ul class="simple">
<li><p>The Gaussian Process module has been reimplemented and now offers classification
and regression estimators through <a class="reference internal" href="../modules/generated/sklearn.gaussian_process.GaussianProcessClassifier.html#sklearn.gaussian_process.GaussianProcessClassifier" title="sklearn.gaussian_process.GaussianProcessClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">gaussian_process.GaussianProcessClassifier</span></code></a>
and  <a class="reference internal" href="../modules/generated/sklearn.gaussian_process.GaussianProcessRegressor.html#sklearn.gaussian_process.GaussianProcessRegressor" title="sklearn.gaussian_process.GaussianProcessRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">gaussian_process.GaussianProcessRegressor</span></code></a>. Among other things, the new
implementation supports kernel engineering, gradient-based hyperparameter optimization or
sampling of functions from GP prior and GP posterior. Extensive documentation and
examples are provided. By <a class="reference external" href="https://jmetzen.github.io/">Jan Hendrik Metzen</a>.</p></li>
<li><p>Added new supervised learning algorithm: <a class="reference internal" href="../modules/neural_networks_supervised.html#multilayer-perceptron"><span class="std std-ref">Multi-layer Perceptron</span></a>
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/3204">#3204</a> by <a class="reference external" href="https://github.com/IssamLaradji">Issam H. Laradji</a></p></li>
<li><p>Added <a class="reference internal" href="../modules/generated/sklearn.linear_model.HuberRegressor.html#sklearn.linear_model.HuberRegressor" title="sklearn.linear_model.HuberRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.HuberRegressor</span></code></a>, a linear model robust to outliers.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/5291">#5291</a> by <a class="reference external" href="https://manojbits.wordpress.com">Manoj Kumar</a>.</p></li>
<li><p>Added the <a class="reference internal" href="../modules/generated/sklearn.multioutput.MultiOutputRegressor.html#sklearn.multioutput.MultiOutputRegressor" title="sklearn.multioutput.MultiOutputRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">multioutput.MultiOutputRegressor</span></code></a> meta-estimator. It
converts single output regressors to multi-output regressors by fitting
one regressor per output. By <a class="reference external" href="https://github.com/betatim">Tim Head</a>.</p></li>
</ul>
<p>Other estimators</p>
<ul class="simple">
<li><p>New <a class="reference internal" href="../modules/generated/sklearn.mixture.GaussianMixture.html#sklearn.mixture.GaussianMixture" title="sklearn.mixture.GaussianMixture"><code class="xref py py-class docutils literal notranslate"><span class="pre">mixture.GaussianMixture</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.mixture.BayesianGaussianMixture.html#sklearn.mixture.BayesianGaussianMixture" title="sklearn.mixture.BayesianGaussianMixture"><code class="xref py py-class docutils literal notranslate"><span class="pre">mixture.BayesianGaussianMixture</span></code></a>
replace former mixture models, employing faster inference
for sounder results. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7295">#7295</a> by <a class="reference external" href="https://github.com/xuewei4d">Wei Xue</a> and
<a class="reference external" href="https://github.com/tguillemot">Thierry Guillemot</a>.</p></li>
<li><p>Class <code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.RandomizedPCA</span></code> is now factored into <a class="reference internal" href="../modules/generated/sklearn.decomposition.PCA.html#sklearn.decomposition.PCA" title="sklearn.decomposition.PCA"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.PCA</span></code></a>
and it is available calling with parameter <code class="docutils literal notranslate"><span class="pre">svd_solver='randomized'</span></code>.
The default number of <code class="docutils literal notranslate"><span class="pre">n_iter</span></code> for <code class="docutils literal notranslate"><span class="pre">'randomized'</span></code> has changed to 4. The old
behavior of PCA is recovered by <code class="docutils literal notranslate"><span class="pre">svd_solver='full'</span></code>. An additional solver
calls <code class="docutils literal notranslate"><span class="pre">arpack</span></code> and performs truncated (non-randomized) SVD. By default,
the best solver is selected depending on the size of the input and the
number of components requested. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/5299">#5299</a> by <a class="reference external" href="https://github.com/giorgiop">Giorgio Patrini</a>.</p></li>
<li><p>Added two functions for mutual information estimation:
<a class="reference internal" href="../modules/generated/sklearn.feature_selection.mutual_info_classif.html#sklearn.feature_selection.mutual_info_classif" title="sklearn.feature_selection.mutual_info_classif"><code class="xref py py-func docutils literal notranslate"><span class="pre">feature_selection.mutual_info_classif</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.feature_selection.mutual_info_regression.html#sklearn.feature_selection.mutual_info_regression" title="sklearn.feature_selection.mutual_info_regression"><code class="xref py py-func docutils literal notranslate"><span class="pre">feature_selection.mutual_info_regression</span></code></a>. These functions can be
used in <a class="reference internal" href="../modules/generated/sklearn.feature_selection.SelectKBest.html#sklearn.feature_selection.SelectKBest" title="sklearn.feature_selection.SelectKBest"><code class="xref py py-class docutils literal notranslate"><span class="pre">feature_selection.SelectKBest</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.feature_selection.SelectPercentile.html#sklearn.feature_selection.SelectPercentile" title="sklearn.feature_selection.SelectPercentile"><code class="xref py py-class docutils literal notranslate"><span class="pre">feature_selection.SelectPercentile</span></code></a> as score functions.
By <a class="reference external" href="https://github.com/AndreaBravi">Andrea Bravi</a> and <a class="reference external" href="https://github.com/nmayorov">Nikolay Mayorov</a>.</p></li>
<li><p>Added the <a class="reference internal" href="../modules/generated/sklearn.ensemble.IsolationForest.html#sklearn.ensemble.IsolationForest" title="sklearn.ensemble.IsolationForest"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.IsolationForest</span></code></a> class for anomaly detection based on
random forests. By <a class="reference external" href="https://ngoix.github.io/">Nicolas Goix</a>.</p></li>
<li><p>Added <code class="docutils literal notranslate"><span class="pre">algorithm=&quot;elkan&quot;</span></code> to <a class="reference internal" href="../modules/generated/sklearn.cluster.KMeans.html#sklearn.cluster.KMeans" title="sklearn.cluster.KMeans"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.KMeans</span></code></a> implementing
Elkan’s fast K-Means algorithm. By <a class="reference external" href="https://amueller.github.io/">Andreas Müller</a>.</p></li>
</ul>
<p>Model selection and evaluation</p>
<ul class="simple">
<li><p>Added <code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.cluster.fowlkes_mallows_score</span></code>, the Fowlkes Mallows
Index which measures the similarity of two clusterings of a set of points
By <a class="reference external" href="https://github.com/afouchet">Arnaud Fouchet</a> and <a class="reference external" href="https://github.com/tguillemot">Thierry Guillemot</a>.</p></li>
<li><p>Added <a class="reference internal" href="../modules/generated/sklearn.metrics.calinski_harabaz_score.html#sklearn.metrics.calinski_harabaz_score" title="sklearn.metrics.calinski_harabaz_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.calinski_harabaz_score</span></code></a>, which computes the Calinski
and Harabaz score to evaluate the resulting clustering of a set of points.
By <a class="reference external" href="https://github.com/afouchet">Arnaud Fouchet</a> and <a class="reference external" href="https://github.com/tguillemot">Thierry Guillemot</a>.</p></li>
<li><p>Added new cross-validation splitter
<a class="reference internal" href="../modules/generated/sklearn.model_selection.TimeSeriesSplit.html#sklearn.model_selection.TimeSeriesSplit" title="sklearn.model_selection.TimeSeriesSplit"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.TimeSeriesSplit</span></code></a> to handle time series data.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/6586">#6586</a> by <a class="reference external" href="https://github.com/yenchenlin">YenChen Lin</a></p></li>
<li><p>The cross-validation iterators are replaced by cross-validation splitters
available from <a class="reference internal" href="../modules/classes.html#module-sklearn.model_selection" title="sklearn.model_selection"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.model_selection</span></code></a>, allowing for nested
cross-validation. See <a class="reference internal" href="#model-selection-changes"><span class="std std-ref">Model Selection Enhancements and API Changes</span></a> for more information.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/4294">#4294</a> by <a class="reference external" href="https://github.com/raghavrv">Raghav RV</a>.</p></li>
</ul>
</div>
<div class="section" id="id3">
<h3>Enhancements<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h3>
<p>Trees and ensembles</p>
<ul class="simple">
<li><p>Added a new splitting criterion for <a class="reference internal" href="../modules/generated/sklearn.tree.DecisionTreeRegressor.html#sklearn.tree.DecisionTreeRegressor" title="sklearn.tree.DecisionTreeRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">tree.DecisionTreeRegressor</span></code></a>,
the mean absolute error. This criterion can also be used in
<a class="reference internal" href="../modules/generated/sklearn.ensemble.ExtraTreesRegressor.html#sklearn.ensemble.ExtraTreesRegressor" title="sklearn.ensemble.ExtraTreesRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.ExtraTreesRegressor</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.ensemble.RandomForestRegressor.html#sklearn.ensemble.RandomForestRegressor" title="sklearn.ensemble.RandomForestRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.RandomForestRegressor</span></code></a>, and the gradient boosting
estimators. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/6667">#6667</a> by <a class="reference external" href="https://github.com/nelson-liu">Nelson Liu</a>.</p></li>
<li><p>Added weighted impurity-based early stopping criterion for decision tree
growth. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/6954">#6954</a> by <a class="reference external" href="https://github.com/nelson-liu">Nelson Liu</a></p></li>
<li><p>The random forest, extra tree and decision tree estimators now has a
method <code class="docutils literal notranslate"><span class="pre">decision_path</span></code> which returns the decision path of samples in
the tree. By <a class="reference external" href="http://www.ajoly.org">Arnaud Joly</a>.</p></li>
<li><p>A new example has been added unveiling the decision tree structure.
By <a class="reference external" href="http://www.ajoly.org">Arnaud Joly</a>.</p></li>
<li><p>Random forest, extra trees, decision trees and gradient boosting estimator
accept the parameter <code class="docutils literal notranslate"><span class="pre">min_samples_split</span></code> and <code class="docutils literal notranslate"><span class="pre">min_samples_leaf</span></code>
provided as a percentage of the training samples. By <a class="reference external" href="https://github.com/yelite">yelite</a> and <a class="reference external" href="http://www.ajoly.org">Arnaud Joly</a>.</p></li>
<li><p>Gradient boosting estimators accept the parameter <code class="docutils literal notranslate"><span class="pre">criterion</span></code> to specify
to splitting criterion used in built decision trees.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/6667">#6667</a> by <a class="reference external" href="https://github.com/nelson-liu">Nelson Liu</a>.</p></li>
<li><p>The memory footprint is reduced (sometimes greatly) for
<code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.bagging.BaseBagging</span></code> and classes that inherit from it,
i.e, <a class="reference internal" href="../modules/generated/sklearn.ensemble.BaggingClassifier.html#sklearn.ensemble.BaggingClassifier" title="sklearn.ensemble.BaggingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.BaggingClassifier</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.ensemble.BaggingRegressor.html#sklearn.ensemble.BaggingRegressor" title="sklearn.ensemble.BaggingRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.BaggingRegressor</span></code></a>, and <a class="reference internal" href="../modules/generated/sklearn.ensemble.IsolationForest.html#sklearn.ensemble.IsolationForest" title="sklearn.ensemble.IsolationForest"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.IsolationForest</span></code></a>,
by dynamically generating attribute <code class="docutils literal notranslate"><span class="pre">estimators_samples_</span></code> only when it is
needed. By <a class="reference external" href="https://github.com/staubda">David Staub</a>.</p></li>
<li><p>Added <code class="docutils literal notranslate"><span class="pre">n_jobs</span></code> and <code class="docutils literal notranslate"><span class="pre">sample_weight</span></code> parameters for
<a class="reference internal" href="../modules/generated/sklearn.ensemble.VotingClassifier.html#sklearn.ensemble.VotingClassifier" title="sklearn.ensemble.VotingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.VotingClassifier</span></code></a> to fit underlying estimators in parallel.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/5805">#5805</a> by <a class="reference external" href="https://github.com/olologin">Ibraim Ganiev</a>.</p></li>
</ul>
<p>Linear, kernelized and related models</p>
<ul class="simple">
<li><p>In <a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegression.html#sklearn.linear_model.LogisticRegression" title="sklearn.linear_model.LogisticRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LogisticRegression</span></code></a>, the SAG solver is now
available in the multinomial case. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/5251">#5251</a> by <a class="reference external" href="https://github.com/TomDLT">Tom Dupre la Tour</a>.</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.linear_model.RANSACRegressor.html#sklearn.linear_model.RANSACRegressor" title="sklearn.linear_model.RANSACRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.RANSACRegressor</span></code></a>, <a class="reference internal" href="../modules/generated/sklearn.svm.LinearSVC.html#sklearn.svm.LinearSVC" title="sklearn.svm.LinearSVC"><code class="xref py py-class docutils literal notranslate"><span class="pre">svm.LinearSVC</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.svm.LinearSVR.html#sklearn.svm.LinearSVR" title="sklearn.svm.LinearSVR"><code class="xref py py-class docutils literal notranslate"><span class="pre">svm.LinearSVR</span></code></a> now support <code class="docutils literal notranslate"><span class="pre">sample_weight</span></code>.
By <a class="reference external" href="https://github.com/Imaculate">Imaculate</a>.</p></li>
<li><p>Add parameter <code class="docutils literal notranslate"><span class="pre">loss</span></code> to <a class="reference internal" href="../modules/generated/sklearn.linear_model.RANSACRegressor.html#sklearn.linear_model.RANSACRegressor" title="sklearn.linear_model.RANSACRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.RANSACRegressor</span></code></a> to measure the
error on the samples for every trial. By <a class="reference external" href="https://manojbits.wordpress.com">Manoj Kumar</a>.</p></li>
<li><p>Prediction of out-of-sample events with Isotonic Regression
(<a class="reference internal" href="../modules/generated/sklearn.isotonic.IsotonicRegression.html#sklearn.isotonic.IsotonicRegression" title="sklearn.isotonic.IsotonicRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">isotonic.IsotonicRegression</span></code></a>) is now much faster (over 1000x in tests with synthetic
data). By <a class="reference external" href="https://github.com/jarfa">Jonathan Arfa</a>.</p></li>
<li><p>Isotonic regression (<a class="reference internal" href="../modules/generated/sklearn.isotonic.IsotonicRegression.html#sklearn.isotonic.IsotonicRegression" title="sklearn.isotonic.IsotonicRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">isotonic.IsotonicRegression</span></code></a>) now uses a better algorithm to avoid
<code class="docutils literal notranslate"><span class="pre">O(n^2)</span></code> behavior in pathological cases, and is also generally faster
(<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/#6691">##6691</a>). By <a class="reference external" href="https://www.ocf.berkeley.edu/~antonyl/">Antony Lee</a>.</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.naive_bayes.GaussianNB.html#sklearn.naive_bayes.GaussianNB" title="sklearn.naive_bayes.GaussianNB"><code class="xref py py-class docutils literal notranslate"><span class="pre">naive_bayes.GaussianNB</span></code></a> now accepts data-independent class-priors
through the parameter <code class="docutils literal notranslate"><span class="pre">priors</span></code>. By <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.linear_model.ElasticNet.html#sklearn.linear_model.ElasticNet" title="sklearn.linear_model.ElasticNet"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.ElasticNet</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.linear_model.Lasso.html#sklearn.linear_model.Lasso" title="sklearn.linear_model.Lasso"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.Lasso</span></code></a>
now works with <code class="docutils literal notranslate"><span class="pre">np.float32</span></code> input data without converting it
into <code class="docutils literal notranslate"><span class="pre">np.float64</span></code>. This allows to reduce the memory
consumption. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/6913">#6913</a> by <a class="reference external" href="https://github.com/yenchenlin">YenChen Lin</a>.</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.semi_supervised.LabelPropagation.html#sklearn.semi_supervised.LabelPropagation" title="sklearn.semi_supervised.LabelPropagation"><code class="xref py py-class docutils literal notranslate"><span class="pre">semi_supervised.LabelPropagation</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.semi_supervised.LabelSpreading.html#sklearn.semi_supervised.LabelSpreading" title="sklearn.semi_supervised.LabelSpreading"><code class="xref py py-class docutils literal notranslate"><span class="pre">semi_supervised.LabelSpreading</span></code></a>
now accept arbitrary kernel functions in addition to strings <code class="docutils literal notranslate"><span class="pre">knn</span></code> and <code class="docutils literal notranslate"><span class="pre">rbf</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/5762">#5762</a> by <a class="reference external" href="https://github.com/musically-ut">Utkarsh Upadhyay</a>.</p></li>
</ul>
<p>Decomposition, manifold learning and clustering</p>
<ul class="simple">
<li><p>Added <code class="docutils literal notranslate"><span class="pre">inverse_transform</span></code> function to <a class="reference internal" href="../modules/generated/sklearn.decomposition.NMF.html#sklearn.decomposition.NMF" title="sklearn.decomposition.NMF"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.NMF</span></code></a> to compute
data matrix of original shape. By <a class="reference external" href="https://github.com/AnishShah">Anish Shah</a>.</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.cluster.KMeans.html#sklearn.cluster.KMeans" title="sklearn.cluster.KMeans"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.KMeans</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.cluster.MiniBatchKMeans.html#sklearn.cluster.MiniBatchKMeans" title="sklearn.cluster.MiniBatchKMeans"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.MiniBatchKMeans</span></code></a> now works
with <code class="docutils literal notranslate"><span class="pre">np.float32</span></code> and <code class="docutils literal notranslate"><span class="pre">np.float64</span></code> input data without converting it.
This allows to reduce the memory consumption by using <code class="docutils literal notranslate"><span class="pre">np.float32</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/6846">#6846</a> by <a class="reference external" href="https://github.com/ssaeger">Sebastian Säger</a> and
<a class="reference external" href="https://github.com/yenchenlin">YenChen Lin</a>.</p></li>
</ul>
<p>Preprocessing and feature selection</p>
<ul class="simple">
<li><p><a class="reference internal" href="../modules/generated/sklearn.preprocessing.RobustScaler.html#sklearn.preprocessing.RobustScaler" title="sklearn.preprocessing.RobustScaler"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.RobustScaler</span></code></a> now accepts <code class="docutils literal notranslate"><span class="pre">quantile_range</span></code> parameter.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/5929">#5929</a> by <a class="reference external" href="https://github.com/podshumok">Konstantin Podshumok</a>.</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.feature_extraction.FeatureHasher.html#sklearn.feature_extraction.FeatureHasher" title="sklearn.feature_extraction.FeatureHasher"><code class="xref py py-class docutils literal notranslate"><span class="pre">feature_extraction.FeatureHasher</span></code></a> now accepts string values.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/6173">#6173</a> by <a class="reference external" href="https://github.com/ryadzenine">Ryad Zenine</a> and
<a class="reference external" href="https://github.com/dsquareindia">Devashish Deshpande</a>.</p></li>
<li><p>Keyword arguments can now be supplied to <code class="docutils literal notranslate"><span class="pre">func</span></code> in
<a class="reference internal" href="../modules/generated/sklearn.preprocessing.FunctionTransformer.html#sklearn.preprocessing.FunctionTransformer" title="sklearn.preprocessing.FunctionTransformer"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.FunctionTransformer</span></code></a> by means of the <code class="docutils literal notranslate"><span class="pre">kw_args</span></code>
parameter. By <a class="reference external" href="https://bmcfee.github.io">Brian McFee</a>.</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.feature_selection.SelectKBest.html#sklearn.feature_selection.SelectKBest" title="sklearn.feature_selection.SelectKBest"><code class="xref py py-class docutils literal notranslate"><span class="pre">feature_selection.SelectKBest</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.feature_selection.SelectPercentile.html#sklearn.feature_selection.SelectPercentile" title="sklearn.feature_selection.SelectPercentile"><code class="xref py py-class docutils literal notranslate"><span class="pre">feature_selection.SelectPercentile</span></code></a>
now accept score functions that take X, y as input and return only the scores.
By <a class="reference external" href="https://github.com/nmayorov">Nikolay Mayorov</a>.</p></li>
</ul>
<p>Model evaluation and meta-estimators</p>
<ul class="simple">
<li><p><a class="reference internal" href="../modules/generated/sklearn.multiclass.OneVsOneClassifier.html#sklearn.multiclass.OneVsOneClassifier" title="sklearn.multiclass.OneVsOneClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">multiclass.OneVsOneClassifier</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.multiclass.OneVsRestClassifier.html#sklearn.multiclass.OneVsRestClassifier" title="sklearn.multiclass.OneVsRestClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">multiclass.OneVsRestClassifier</span></code></a>
now support <code class="docutils literal notranslate"><span class="pre">partial_fit</span></code>. By <a class="reference external" href="https://github.com/kaichogami">Asish Panda</a> and
<a class="reference external" href="https://github.com/phdowling">Philipp Dowling</a>.</p></li>
<li><p>Added support for substituting or disabling <a class="reference internal" href="../modules/generated/sklearn.pipeline.Pipeline.html#sklearn.pipeline.Pipeline" title="sklearn.pipeline.Pipeline"><code class="xref py py-class docutils literal notranslate"><span class="pre">pipeline.Pipeline</span></code></a>
and <a class="reference internal" href="../modules/generated/sklearn.pipeline.FeatureUnion.html#sklearn.pipeline.FeatureUnion" title="sklearn.pipeline.FeatureUnion"><code class="xref py py-class docutils literal notranslate"><span class="pre">pipeline.FeatureUnion</span></code></a> components using the <code class="docutils literal notranslate"><span class="pre">set_params</span></code>
interface that powers <code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.grid_search</span></code>.
See <a class="reference internal" href="../auto_examples/compose/plot_compare_reduction.html#sphx-glr-auto-examples-compose-plot-compare-reduction-py"><span class="std std-ref">Selecting dimensionality reduction with Pipeline and GridSearchCV</span></a>
By <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a> and <a class="reference external" href="https://github.com/rmcgibbo">Robert McGibbon</a>.</p></li>
<li><p>The new <code class="docutils literal notranslate"><span class="pre">cv_results_</span></code> attribute of <a class="reference internal" href="../modules/generated/sklearn.model_selection.GridSearchCV.html#sklearn.model_selection.GridSearchCV" title="sklearn.model_selection.GridSearchCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.GridSearchCV</span></code></a>
(and <a class="reference internal" href="../modules/generated/sklearn.model_selection.RandomizedSearchCV.html#sklearn.model_selection.RandomizedSearchCV" title="sklearn.model_selection.RandomizedSearchCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.RandomizedSearchCV</span></code></a>) can be easily imported
into pandas as a <code class="docutils literal notranslate"><span class="pre">DataFrame</span></code>. Ref <a class="reference internal" href="#model-selection-changes"><span class="std std-ref">Model Selection Enhancements and API Changes</span></a> for
more information. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/6697">#6697</a> by <a class="reference external" href="https://github.com/raghavrv">Raghav RV</a>.</p></li>
<li><p>Generalization of <a class="reference internal" href="../modules/generated/sklearn.model_selection.cross_val_predict.html#sklearn.model_selection.cross_val_predict" title="sklearn.model_selection.cross_val_predict"><code class="xref py py-func docutils literal notranslate"><span class="pre">model_selection.cross_val_predict</span></code></a>.
One can pass method names such as <code class="docutils literal notranslate"><span class="pre">predict_proba</span></code> to be used in the cross
validation framework instead of the default <code class="docutils literal notranslate"><span class="pre">predict</span></code>.
By <a class="reference external" href="https://github.com/zivori">Ori Ziv</a> and <a class="reference external" href="https://github.com/merritts">Sears Merritt</a>.</p></li>
<li><p>The training scores and time taken for training followed by scoring for
each search candidate are now available at the <code class="docutils literal notranslate"><span class="pre">cv_results_</span></code> dict.
See <a class="reference internal" href="#model-selection-changes"><span class="std std-ref">Model Selection Enhancements and API Changes</span></a> for more information.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7325">#7325</a> by <a class="reference external" href="https://github.com/eyc88">Eugene Chen</a> and <a class="reference external" href="https://github.com/raghavrv">Raghav RV</a>.</p></li>
</ul>
<p>Metrics</p>
<ul class="simple">
<li><p>Added <code class="docutils literal notranslate"><span class="pre">labels</span></code> flag to <a class="reference internal" href="../modules/generated/sklearn.metrics.log_loss.html#sklearn.metrics.log_loss" title="sklearn.metrics.log_loss"><code class="xref py py-class docutils literal notranslate"><span class="pre">metrics.log_loss</span></code></a> to explicitly provide
the labels when the number of classes in <code class="docutils literal notranslate"><span class="pre">y_true</span></code> and <code class="docutils literal notranslate"><span class="pre">y_pred</span></code> differ.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7239">#7239</a> by <a class="reference external" href="https://github.com/hongguangguo">Hong Guangguo</a> with help from
<a class="reference external" href="https://github.com/indianajensen">Mads Jensen</a> and <a class="reference external" href="https://github.com/nelson-liu">Nelson Liu</a>.</p></li>
<li><p>Support sparse contingency matrices in cluster evaluation
(<code class="xref py py-mod docutils literal notranslate"><span class="pre">metrics.cluster.supervised</span></code>) to scale to a large number of
clusters.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7419">#7419</a> by <a class="reference external" href="https://github.com/stuppie">Gregory Stupp</a> and <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a>.</p></li>
<li><p>Add <code class="docutils literal notranslate"><span class="pre">sample_weight</span></code> parameter to <a class="reference internal" href="../modules/generated/sklearn.metrics.matthews_corrcoef.html#sklearn.metrics.matthews_corrcoef" title="sklearn.metrics.matthews_corrcoef"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.matthews_corrcoef</span></code></a>.
By <a class="reference external" href="https://github.com/jatinshah">Jatin Shah</a> and <a class="reference external" href="https://github.com/raghavrv">Raghav RV</a>.</p></li>
<li><p>Speed up <a class="reference internal" href="../modules/generated/sklearn.metrics.silhouette_score.html#sklearn.metrics.silhouette_score" title="sklearn.metrics.silhouette_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.silhouette_score</span></code></a> by using vectorized operations.
By <a class="reference external" href="https://manojbits.wordpress.com">Manoj Kumar</a>.</p></li>
<li><p>Add <code class="docutils literal notranslate"><span class="pre">sample_weight</span></code> parameter to <a class="reference internal" href="../modules/generated/sklearn.metrics.confusion_matrix.html#sklearn.metrics.confusion_matrix" title="sklearn.metrics.confusion_matrix"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.confusion_matrix</span></code></a>.
By <a class="reference external" href="https://github.com/DanielSidhion">Bernardo Stein</a>.</p></li>
</ul>
<p>Miscellaneous</p>
<ul class="simple">
<li><p>Added <code class="docutils literal notranslate"><span class="pre">n_jobs</span></code> parameter to <a class="reference internal" href="../modules/generated/sklearn.feature_selection.RFECV.html#sklearn.feature_selection.RFECV" title="sklearn.feature_selection.RFECV"><code class="xref py py-class docutils literal notranslate"><span class="pre">feature_selection.RFECV</span></code></a> to compute
the score on the test folds in parallel. By <a class="reference external" href="https://manojbits.wordpress.com">Manoj Kumar</a></p></li>
<li><p>Codebase does not contain C/C++ cython generated files: they are
generated during build. Distribution packages will still contain generated
C/C++ files. By <a class="reference external" href="https://github.com/arthurmensch">Arthur Mensch</a>.</p></li>
<li><p>Reduce the memory usage for 32-bit float input arrays of
<code class="xref py py-func docutils literal notranslate"><span class="pre">utils.sparse_func.mean_variance_axis</span></code> and
<code class="xref py py-func docutils literal notranslate"><span class="pre">utils.sparse_func.incr_mean_variance_axis</span></code> by supporting cython
fused types. By <a class="reference external" href="https://github.com/yenchenlin">YenChen Lin</a>.</p></li>
<li><p>The <code class="xref py py-func docutils literal notranslate"><span class="pre">ignore_warnings</span></code> now accept a category argument to ignore only
the warnings of a specified type. By <a class="reference external" href="https://github.com/tguillemot">Thierry Guillemot</a>.</p></li>
<li><p>Added parameter <code class="docutils literal notranslate"><span class="pre">return_X_y</span></code> and return type <code class="docutils literal notranslate"><span class="pre">(data,</span> <span class="pre">target)</span> <span class="pre">:</span> <span class="pre">tuple</span></code> option to
<code class="xref py py-func docutils literal notranslate"><span class="pre">load_iris</span></code> dataset
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7049">#7049</a>,
<code class="xref py py-func docutils literal notranslate"><span class="pre">load_breast_cancer</span></code> dataset
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7152">#7152</a>,
<code class="xref py py-func docutils literal notranslate"><span class="pre">load_digits</span></code> dataset,
<code class="xref py py-func docutils literal notranslate"><span class="pre">load_diabetes</span></code> dataset,
<code class="xref py py-func docutils literal notranslate"><span class="pre">load_linnerud</span></code> dataset,
<code class="xref py py-func docutils literal notranslate"><span class="pre">load_boston</span></code> dataset
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7154">#7154</a> by
<a class="reference external" href="https://github.com/manu-chroma">Manvendra Singh</a>.</p></li>
<li><p>Simplification of the <code class="docutils literal notranslate"><span class="pre">clone</span></code> function, deprecate support for estimators
that modify parameters in <code class="docutils literal notranslate"><span class="pre">__init__</span></code>. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/5540">#5540</a> by <a class="reference external" href="https://amueller.github.io/">Andreas Müller</a>.</p></li>
<li><p>When unpickling a scikit-learn estimator in a different version than the one
the estimator was trained with, a <code class="docutils literal notranslate"><span class="pre">UserWarning</span></code> is raised, see <a class="reference internal" href="../modules/model_persistence.html#persistence-limitations"><span class="std std-ref">the documentation
on model persistence</span></a> for more details. (<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7248">#7248</a>)
By <a class="reference external" href="https://amueller.github.io/">Andreas Müller</a>.</p></li>
</ul>
</div>
<div class="section" id="id4">
<h3>Bug fixes<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h3>
<p>Trees and ensembles</p>
<ul class="simple">
<li><p>Random forest, extra trees, decision trees and gradient boosting
won’t accept anymore <code class="docutils literal notranslate"><span class="pre">min_samples_split=1</span></code> as at least 2 samples
are required to split a decision tree node. By <a class="reference external" href="http://www.ajoly.org">Arnaud Joly</a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.ensemble.VotingClassifier.html#sklearn.ensemble.VotingClassifier" title="sklearn.ensemble.VotingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.VotingClassifier</span></code></a> now raises <code class="docutils literal notranslate"><span class="pre">NotFittedError</span></code> if <code class="docutils literal notranslate"><span class="pre">predict</span></code>,
<code class="docutils literal notranslate"><span class="pre">transform</span></code> or <code class="docutils literal notranslate"><span class="pre">predict_proba</span></code> are called on the non-fitted estimator.
by <a class="reference external" href="https://sebastianraschka.com/">Sebastian Raschka</a>.</p></li>
<li><p>Fix bug where <a class="reference internal" href="../modules/generated/sklearn.ensemble.AdaBoostClassifier.html#sklearn.ensemble.AdaBoostClassifier" title="sklearn.ensemble.AdaBoostClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.AdaBoostClassifier</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.ensemble.AdaBoostRegressor.html#sklearn.ensemble.AdaBoostRegressor" title="sklearn.ensemble.AdaBoostRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.AdaBoostRegressor</span></code></a> would perform poorly if the
<code class="docutils literal notranslate"><span class="pre">random_state</span></code> was fixed
(<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7411">#7411</a>). By <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a>.</p></li>
<li><p>Fix bug in ensembles with randomization where the ensemble would not
set <code class="docutils literal notranslate"><span class="pre">random_state</span></code> on base estimators in a pipeline or similar nesting.
(<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7411">#7411</a>). Note, results for <a class="reference internal" href="../modules/generated/sklearn.ensemble.BaggingClassifier.html#sklearn.ensemble.BaggingClassifier" title="sklearn.ensemble.BaggingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.BaggingClassifier</span></code></a>
<a class="reference internal" href="../modules/generated/sklearn.ensemble.BaggingRegressor.html#sklearn.ensemble.BaggingRegressor" title="sklearn.ensemble.BaggingRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.BaggingRegressor</span></code></a>, <a class="reference internal" href="../modules/generated/sklearn.ensemble.AdaBoostClassifier.html#sklearn.ensemble.AdaBoostClassifier" title="sklearn.ensemble.AdaBoostClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.AdaBoostClassifier</span></code></a>
and <a class="reference internal" href="../modules/generated/sklearn.ensemble.AdaBoostRegressor.html#sklearn.ensemble.AdaBoostRegressor" title="sklearn.ensemble.AdaBoostRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.AdaBoostRegressor</span></code></a> will now differ from previous
versions. By <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a>.</p></li>
</ul>
<p>Linear, kernelized and related models</p>
<ul class="simple">
<li><p>Fixed incorrect gradient computation for <code class="docutils literal notranslate"><span class="pre">loss='squared_epsilon_insensitive'</span></code> in
<a class="reference internal" href="../modules/generated/sklearn.linear_model.SGDClassifier.html#sklearn.linear_model.SGDClassifier" title="sklearn.linear_model.SGDClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.SGDClassifier</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.linear_model.SGDRegressor.html#sklearn.linear_model.SGDRegressor" title="sklearn.linear_model.SGDRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.SGDRegressor</span></code></a>
(<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/6764">#6764</a>). By <a class="reference external" href="https://github.com/geekoala">Wenhua Yang</a>.</p></li>
<li><p>Fix bug in <a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegressionCV.html#sklearn.linear_model.LogisticRegressionCV" title="sklearn.linear_model.LogisticRegressionCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LogisticRegressionCV</span></code></a> where
<code class="docutils literal notranslate"><span class="pre">solver='liblinear'</span></code> did not accept <code class="docutils literal notranslate"><span class="pre">class_weights='balanced</span></code>.
(<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/6817">#6817</a>). By <a class="reference external" href="https://github.com/TomDLT">Tom Dupre la Tour</a>.</p></li>
<li><p>Fix bug in <a class="reference internal" href="../modules/generated/sklearn.neighbors.RadiusNeighborsClassifier.html#sklearn.neighbors.RadiusNeighborsClassifier" title="sklearn.neighbors.RadiusNeighborsClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">neighbors.RadiusNeighborsClassifier</span></code></a> where an error
occurred when there were outliers being labelled and a weight function
specified (<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/6902">#6902</a>).  By
<a class="reference external" href="https://github.com/LeonieBorne">LeonieBorne</a>.</p></li>
<li><p>Fix <a class="reference internal" href="../modules/generated/sklearn.linear_model.ElasticNet.html#sklearn.linear_model.ElasticNet" title="sklearn.linear_model.ElasticNet"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.ElasticNet</span></code></a> sparse decision function to match
output with dense in the multioutput case.</p></li>
</ul>
<p>Decomposition, manifold learning and clustering</p>
<ul class="simple">
<li><p><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.RandomizedPCA</span></code> default number of <code class="docutils literal notranslate"><span class="pre">iterated_power</span></code> is 4 instead of 3.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/5141">#5141</a> by <a class="reference external" href="https://github.com/giorgiop">Giorgio Patrini</a>.</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.utils.extmath.randomized_svd.html#sklearn.utils.extmath.randomized_svd" title="sklearn.utils.extmath.randomized_svd"><code class="xref py py-func docutils literal notranslate"><span class="pre">utils.extmath.randomized_svd</span></code></a> performs 4 power iterations by default, instead or 0.
In practice this is enough for obtaining a good approximation of the
true eigenvalues/vectors in the presence of noise. When <code class="docutils literal notranslate"><span class="pre">n_components</span></code> is
small (<code class="docutils literal notranslate"><span class="pre">&lt;</span> <span class="pre">.1</span> <span class="pre">*</span> <span class="pre">min(X.shape)</span></code>) <code class="docutils literal notranslate"><span class="pre">n_iter</span></code> is set to 7, unless the user specifies
a higher number. This improves precision with few components.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/5299">#5299</a> by <a class="reference external" href="https://github.com/giorgiop">Giorgio Patrini</a>.</p></li>
<li><p>Whiten/non-whiten inconsistency between components of <a class="reference internal" href="../modules/generated/sklearn.decomposition.PCA.html#sklearn.decomposition.PCA" title="sklearn.decomposition.PCA"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.PCA</span></code></a>
and <code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.RandomizedPCA</span></code> (now factored into PCA, see the
New features) is fixed. <code class="docutils literal notranslate"><span class="pre">components_</span></code> are stored with no whitening.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/5299">#5299</a> by <a class="reference external" href="https://github.com/giorgiop">Giorgio Patrini</a>.</p></li>
<li><p>Fixed bug in <a class="reference internal" href="../modules/generated/sklearn.manifold.spectral_embedding.html#sklearn.manifold.spectral_embedding" title="sklearn.manifold.spectral_embedding"><code class="xref py py-func docutils literal notranslate"><span class="pre">manifold.spectral_embedding</span></code></a> where diagonal of unnormalized
Laplacian matrix was incorrectly set to 1. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/4995">#4995</a> by <a class="reference external" href="https://github.com/yanlend">Peter Fischer</a>.</p></li>
<li><p>Fixed incorrect initialization of <code class="xref py py-func docutils literal notranslate"><span class="pre">utils.arpack.eigsh</span></code> on all
occurrences. Affects <code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.bicluster.SpectralBiclustering</span></code>,
<a class="reference internal" href="../modules/generated/sklearn.decomposition.KernelPCA.html#sklearn.decomposition.KernelPCA" title="sklearn.decomposition.KernelPCA"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.KernelPCA</span></code></a>, <a class="reference internal" href="../modules/generated/sklearn.manifold.LocallyLinearEmbedding.html#sklearn.manifold.LocallyLinearEmbedding" title="sklearn.manifold.LocallyLinearEmbedding"><code class="xref py py-class docutils literal notranslate"><span class="pre">manifold.LocallyLinearEmbedding</span></code></a>,
and <a class="reference internal" href="../modules/generated/sklearn.manifold.SpectralEmbedding.html#sklearn.manifold.SpectralEmbedding" title="sklearn.manifold.SpectralEmbedding"><code class="xref py py-class docutils literal notranslate"><span class="pre">manifold.SpectralEmbedding</span></code></a> (<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/5012">#5012</a>). By
<a class="reference external" href="https://github.com/yanlend">Peter Fischer</a>.</p></li>
<li><p>Attribute <code class="docutils literal notranslate"><span class="pre">explained_variance_ratio_</span></code> calculated with the SVD solver
of <a class="reference internal" href="../modules/generated/sklearn.discriminant_analysis.LinearDiscriminantAnalysis.html#sklearn.discriminant_analysis.LinearDiscriminantAnalysis" title="sklearn.discriminant_analysis.LinearDiscriminantAnalysis"><code class="xref py py-class docutils literal notranslate"><span class="pre">discriminant_analysis.LinearDiscriminantAnalysis</span></code></a> now returns
correct results. By <a class="reference external" href="https://github.com/JPFrancoia">JPFrancoia</a></p></li>
</ul>
<p>Preprocessing and feature selection</p>
<ul class="simple">
<li><p><code class="xref py py-func docutils literal notranslate"><span class="pre">preprocessing.data._transform_selected</span></code> now always passes a copy
of <code class="docutils literal notranslate"><span class="pre">X</span></code> to transform function when <code class="docutils literal notranslate"><span class="pre">copy=True</span></code> (<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7194">#7194</a>). By <a class="reference external" href="https://github.com/caioaao">Caio
Oliveira</a>.</p></li>
</ul>
<p>Model evaluation and meta-estimators</p>
<ul class="simple">
<li><p><a class="reference internal" href="../modules/generated/sklearn.model_selection.StratifiedKFold.html#sklearn.model_selection.StratifiedKFold" title="sklearn.model_selection.StratifiedKFold"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.StratifiedKFold</span></code></a> now raises error if all n_labels
for individual classes is less than n_folds.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/6182">#6182</a> by <a class="reference external" href="https://github.com/dsquareindia">Devashish Deshpande</a>.</p></li>
<li><p>Fixed bug in <a class="reference internal" href="../modules/generated/sklearn.model_selection.StratifiedShuffleSplit.html#sklearn.model_selection.StratifiedShuffleSplit" title="sklearn.model_selection.StratifiedShuffleSplit"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.StratifiedShuffleSplit</span></code></a>
where train and test sample could overlap in some edge cases,
see <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/6121">#6121</a> for
more details. By <a class="reference external" href="https://github.com/lesteve">Loic Esteve</a>.</p></li>
<li><p>Fix in <a class="reference internal" href="../modules/generated/sklearn.model_selection.StratifiedShuffleSplit.html#sklearn.model_selection.StratifiedShuffleSplit" title="sklearn.model_selection.StratifiedShuffleSplit"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.model_selection.StratifiedShuffleSplit</span></code></a> to
return splits of size <code class="docutils literal notranslate"><span class="pre">train_size</span></code> and <code class="docutils literal notranslate"><span class="pre">test_size</span></code> in all cases
(<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/6472">#6472</a>). By <a class="reference external" href="https://amueller.github.io/">Andreas Müller</a>.</p></li>
<li><p>Cross-validation of <code class="xref py py-class docutils literal notranslate"><span class="pre">OneVsOneClassifier</span></code> and
<code class="xref py py-class docutils literal notranslate"><span class="pre">OneVsRestClassifier</span></code> now works with precomputed kernels.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7350">#7350</a> by <a class="reference external" href="https://github.com/rsmith54">Russell Smith</a>.</p></li>
<li><p>Fix incomplete <code class="docutils literal notranslate"><span class="pre">predict_proba</span></code> method delegation from
<a class="reference internal" href="../modules/generated/sklearn.model_selection.GridSearchCV.html#sklearn.model_selection.GridSearchCV" title="sklearn.model_selection.GridSearchCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.GridSearchCV</span></code></a> to
<a class="reference internal" href="../modules/generated/sklearn.linear_model.SGDClassifier.html#sklearn.linear_model.SGDClassifier" title="sklearn.linear_model.SGDClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.SGDClassifier</span></code></a> (<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7159">#7159</a>)
by <a class="reference external" href="https://github.com/yl565">Yichuan Liu</a>.</p></li>
</ul>
<p>Metrics</p>
<ul class="simple">
<li><p>Fix bug in <a class="reference internal" href="../modules/generated/sklearn.metrics.silhouette_score.html#sklearn.metrics.silhouette_score" title="sklearn.metrics.silhouette_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.silhouette_score</span></code></a> in which clusters of
size 1 were incorrectly scored. They should get a score of 0.
By <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a>.</p></li>
<li><p>Fix bug in <a class="reference internal" href="../modules/generated/sklearn.metrics.silhouette_samples.html#sklearn.metrics.silhouette_samples" title="sklearn.metrics.silhouette_samples"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.silhouette_samples</span></code></a> so that it now works with
arbitrary labels, not just those ranging from 0 to n_clusters - 1.</p></li>
<li><p>Fix bug where expected and adjusted mutual information were incorrect if
cluster contingency cells exceeded <code class="docutils literal notranslate"><span class="pre">2**16</span></code>. By <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a>.</p></li>
<li><p><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.pairwise.pairwise_distances</span></code> now converts arrays to
boolean arrays when required in <code class="docutils literal notranslate"><span class="pre">scipy.spatial.distance</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/5460">#5460</a> by <a class="reference external" href="https://github.com/TomDLT">Tom Dupre la Tour</a>.</p></li>
<li><p>Fix sparse input support in <a class="reference internal" href="../modules/generated/sklearn.metrics.silhouette_score.html#sklearn.metrics.silhouette_score" title="sklearn.metrics.silhouette_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.silhouette_score</span></code></a> as well as
example examples/text/document_clustering.py. By <a class="reference external" href="https://github.com/yenchenlin">YenChen Lin</a>.</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.metrics.roc_curve.html#sklearn.metrics.roc_curve" title="sklearn.metrics.roc_curve"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.roc_curve</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.metrics.precision_recall_curve.html#sklearn.metrics.precision_recall_curve" title="sklearn.metrics.precision_recall_curve"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.precision_recall_curve</span></code></a> no
longer round <code class="docutils literal notranslate"><span class="pre">y_score</span></code> values when creating ROC curves; this was causing
problems for users with very small differences in scores (<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7353">#7353</a>).</p></li>
</ul>
<p>Miscellaneous</p>
<ul class="simple">
<li><p><code class="xref py py-func docutils literal notranslate"><span class="pre">model_selection.tests._search._check_param_grid</span></code> now works correctly with all types
that extends/implements <code class="docutils literal notranslate"><span class="pre">Sequence</span></code> (except string), including range (Python 3.x) and xrange
(Python 2.x). <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7323">#7323</a> by Viacheslav Kovalevskyi.</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.utils.extmath.randomized_range_finder.html#sklearn.utils.extmath.randomized_range_finder" title="sklearn.utils.extmath.randomized_range_finder"><code class="xref py py-func docutils literal notranslate"><span class="pre">utils.extmath.randomized_range_finder</span></code></a> is more numerically stable when many
power iterations are requested, since it applies LU normalization by default.
If <code class="docutils literal notranslate"><span class="pre">n_iter&lt;2</span></code> numerical issues are unlikely, thus no normalization is applied.
Other normalization options are available: <code class="docutils literal notranslate"><span class="pre">'none',</span> <span class="pre">'LU'</span></code> and <code class="docutils literal notranslate"><span class="pre">'QR'</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/5141">#5141</a> by <a class="reference external" href="https://github.com/giorgiop">Giorgio Patrini</a>.</p></li>
<li><p>Fix a bug where some formats of <code class="docutils literal notranslate"><span class="pre">scipy.sparse</span></code> matrix, and estimators
with them as parameters, could not be passed to <a class="reference internal" href="../modules/generated/sklearn.base.clone.html#sklearn.base.clone" title="sklearn.base.clone"><code class="xref py py-func docutils literal notranslate"><span class="pre">base.clone</span></code></a>.
By <a class="reference external" href="https://github.com/lesteve">Loic Esteve</a>.</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.datasets.load_svmlight_file.html#sklearn.datasets.load_svmlight_file" title="sklearn.datasets.load_svmlight_file"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.load_svmlight_file</span></code></a> now is able to read long int QID values.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7101">#7101</a> by <a class="reference external" href="https://github.com/olologin">Ibraim Ganiev</a>.</p></li>
</ul>
</div>
</div>
<div class="section" id="id5">
<h2>API changes summary<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h2>
<p>Linear, kernelized and related models</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">residual_metric</span></code> has been deprecated in <a class="reference internal" href="../modules/generated/sklearn.linear_model.RANSACRegressor.html#sklearn.linear_model.RANSACRegressor" title="sklearn.linear_model.RANSACRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.RANSACRegressor</span></code></a>.
Use <code class="docutils literal notranslate"><span class="pre">loss</span></code> instead. By <a class="reference external" href="https://manojbits.wordpress.com">Manoj Kumar</a>.</p></li>
<li><p>Access to public attributes <code class="docutils literal notranslate"><span class="pre">.X_</span></code> and <code class="docutils literal notranslate"><span class="pre">.y_</span></code> has been deprecated in
<a class="reference internal" href="../modules/generated/sklearn.isotonic.IsotonicRegression.html#sklearn.isotonic.IsotonicRegression" title="sklearn.isotonic.IsotonicRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">isotonic.IsotonicRegression</span></code></a>. By <a class="reference external" href="https://github.com/jarfa">Jonathan Arfa</a>.</p></li>
</ul>
<p>Decomposition, manifold learning and clustering</p>
<ul class="simple">
<li><p>The old <code class="xref py py-class docutils literal notranslate"><span class="pre">mixture.DPGMM</span></code> is deprecated in favor of the new
<a class="reference internal" href="../modules/generated/sklearn.mixture.BayesianGaussianMixture.html#sklearn.mixture.BayesianGaussianMixture" title="sklearn.mixture.BayesianGaussianMixture"><code class="xref py py-class docutils literal notranslate"><span class="pre">mixture.BayesianGaussianMixture</span></code></a> (with the parameter
<code class="docutils literal notranslate"><span class="pre">weight_concentration_prior_type='dirichlet_process'</span></code>).
The new class solves the computational
problems of the old class and computes the Gaussian mixture with a
Dirichlet process prior faster than before.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7295">#7295</a> by <a class="reference external" href="https://github.com/xuewei4d">Wei Xue</a> and <a class="reference external" href="https://github.com/tguillemot">Thierry Guillemot</a>.</p></li>
<li><p>The old <code class="xref py py-class docutils literal notranslate"><span class="pre">mixture.VBGMM</span></code> is deprecated in favor of the new
<a class="reference internal" href="../modules/generated/sklearn.mixture.BayesianGaussianMixture.html#sklearn.mixture.BayesianGaussianMixture" title="sklearn.mixture.BayesianGaussianMixture"><code class="xref py py-class docutils literal notranslate"><span class="pre">mixture.BayesianGaussianMixture</span></code></a> (with the parameter
<code class="docutils literal notranslate"><span class="pre">weight_concentration_prior_type='dirichlet_distribution'</span></code>).
The new class solves the computational
problems of the old class and computes the Variational Bayesian Gaussian
mixture faster than before.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/6651">#6651</a> by <a class="reference external" href="https://github.com/xuewei4d">Wei Xue</a> and <a class="reference external" href="https://github.com/tguillemot">Thierry Guillemot</a>.</p></li>
<li><p>The old <code class="xref py py-class docutils literal notranslate"><span class="pre">mixture.GMM</span></code> is deprecated in favor of the new
<a class="reference internal" href="../modules/generated/sklearn.mixture.GaussianMixture.html#sklearn.mixture.GaussianMixture" title="sklearn.mixture.GaussianMixture"><code class="xref py py-class docutils literal notranslate"><span class="pre">mixture.GaussianMixture</span></code></a>. The new class computes the Gaussian mixture
faster than before and some of computational problems have been solved.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/6666">#6666</a> by <a class="reference external" href="https://github.com/xuewei4d">Wei Xue</a> and <a class="reference external" href="https://github.com/tguillemot">Thierry Guillemot</a>.</p></li>
</ul>
<p>Model evaluation and meta-estimators</p>
<ul class="simple">
<li><p>The <code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.cross_validation</span></code>, <code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.grid_search</span></code> and
<code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.learning_curve</span></code> have been deprecated and the classes and
functions have been reorganized into the <a class="reference internal" href="../modules/classes.html#module-sklearn.model_selection" title="sklearn.model_selection"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.model_selection</span></code></a>
module. Ref <a class="reference internal" href="#model-selection-changes"><span class="std std-ref">Model Selection Enhancements and API Changes</span></a> for more information.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/4294">#4294</a> by <a class="reference external" href="https://github.com/raghavrv">Raghav RV</a>.</p></li>
<li><p>The <code class="docutils literal notranslate"><span class="pre">grid_scores_</span></code> attribute of <a class="reference internal" href="../modules/generated/sklearn.model_selection.GridSearchCV.html#sklearn.model_selection.GridSearchCV" title="sklearn.model_selection.GridSearchCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.GridSearchCV</span></code></a>
and <a class="reference internal" href="../modules/generated/sklearn.model_selection.RandomizedSearchCV.html#sklearn.model_selection.RandomizedSearchCV" title="sklearn.model_selection.RandomizedSearchCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.RandomizedSearchCV</span></code></a> is deprecated in favor of
the attribute <code class="docutils literal notranslate"><span class="pre">cv_results_</span></code>.
Ref <a class="reference internal" href="#model-selection-changes"><span class="std std-ref">Model Selection Enhancements and API Changes</span></a> for more information.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/6697">#6697</a> by <a class="reference external" href="https://github.com/raghavrv">Raghav RV</a>.</p></li>
<li><p>The parameters <code class="docutils literal notranslate"><span class="pre">n_iter</span></code> or <code class="docutils literal notranslate"><span class="pre">n_folds</span></code> in old CV splitters are replaced
by the new parameter <code class="docutils literal notranslate"><span class="pre">n_splits</span></code> since it can provide a consistent
and unambiguous interface to represent the number of train-test splits.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7187">#7187</a> by <a class="reference external" href="https://github.com/yenchenlin">YenChen Lin</a>.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">classes</span></code> parameter was renamed to <code class="docutils literal notranslate"><span class="pre">labels</span></code> in
<a class="reference internal" href="../modules/generated/sklearn.metrics.hamming_loss.html#sklearn.metrics.hamming_loss" title="sklearn.metrics.hamming_loss"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.hamming_loss</span></code></a>. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7260">#7260</a> by <a class="reference external" href="https://github.com/srvanrell">Sebastián Vanrell</a>.</p></li>
<li><p>The splitter classes <code class="docutils literal notranslate"><span class="pre">LabelKFold</span></code>, <code class="docutils literal notranslate"><span class="pre">LabelShuffleSplit</span></code>,
<code class="docutils literal notranslate"><span class="pre">LeaveOneLabelOut</span></code> and <code class="docutils literal notranslate"><span class="pre">LeavePLabelsOut</span></code> are renamed to
<a class="reference internal" href="../modules/generated/sklearn.model_selection.GroupKFold.html#sklearn.model_selection.GroupKFold" title="sklearn.model_selection.GroupKFold"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.GroupKFold</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.model_selection.GroupShuffleSplit.html#sklearn.model_selection.GroupShuffleSplit" title="sklearn.model_selection.GroupShuffleSplit"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.GroupShuffleSplit</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.model_selection.LeaveOneGroupOut.html#sklearn.model_selection.LeaveOneGroupOut" title="sklearn.model_selection.LeaveOneGroupOut"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.LeaveOneGroupOut</span></code></a>
and <a class="reference internal" href="../modules/generated/sklearn.model_selection.LeavePGroupsOut.html#sklearn.model_selection.LeavePGroupsOut" title="sklearn.model_selection.LeavePGroupsOut"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.LeavePGroupsOut</span></code></a> respectively.
Also the parameter <code class="docutils literal notranslate"><span class="pre">labels</span></code> in the <code class="xref py py-func docutils literal notranslate"><span class="pre">split</span></code> method of the newly
renamed splitters <a class="reference internal" href="../modules/generated/sklearn.model_selection.LeaveOneGroupOut.html#sklearn.model_selection.LeaveOneGroupOut" title="sklearn.model_selection.LeaveOneGroupOut"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.LeaveOneGroupOut</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.model_selection.LeavePGroupsOut.html#sklearn.model_selection.LeavePGroupsOut" title="sklearn.model_selection.LeavePGroupsOut"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.LeavePGroupsOut</span></code></a> is renamed to
<code class="docutils literal notranslate"><span class="pre">groups</span></code>. Additionally in <a class="reference internal" href="../modules/generated/sklearn.model_selection.LeavePGroupsOut.html#sklearn.model_selection.LeavePGroupsOut" title="sklearn.model_selection.LeavePGroupsOut"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.LeavePGroupsOut</span></code></a>,
the parameter <code class="docutils literal notranslate"><span class="pre">n_labels</span></code> is renamed to <code class="docutils literal notranslate"><span class="pre">n_groups</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/6660">#6660</a> by <a class="reference external" href="https://github.com/raghavrv">Raghav RV</a>.</p></li>
<li><p>Error and loss names for <code class="docutils literal notranslate"><span class="pre">scoring</span></code> parameters are now prefixed by
<code class="docutils literal notranslate"><span class="pre">'neg_'</span></code>, such as <code class="docutils literal notranslate"><span class="pre">neg_mean_squared_error</span></code>. The unprefixed versions
are deprecated and will be removed in version 0.20.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7261">#7261</a> by <a class="reference external" href="https://github.com/betatim">Tim Head</a>.</p></li>
</ul>
</div>
<div class="section" id="id6">
<h2>Code Contributors<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h2>
<p>Aditya Joshi, Alejandro, Alexander Fabisch, Alexander Loginov, Alexander
Minyushkin, Alexander Rudy, Alexandre Abadie, Alexandre Abraham, Alexandre
Gramfort, Alexandre Saint, alexfields, Alvaro Ulloa, alyssaq, Amlan Kar,
Andreas Mueller, andrew giessel, Andrew Jackson, Andrew McCulloh, Andrew
Murray, Anish Shah, Arafat, Archit Sharma, Ariel Rokem, Arnaud Joly, Arnaud
Rachez, Arthur Mensch, Ash Hoover, asnt, b0noI, Behzad Tabibian, Bernardo,
Bernhard Kratzwald, Bhargav Mangipudi, blakeflei, Boyuan Deng, Brandon Carter,
Brett Naul, Brian McFee, Caio Oliveira, Camilo Lamus, Carol Willing, Cass,
CeShine Lee, Charles Truong, Chyi-Kwei Yau, CJ Carey, codevig, Colin Ni, Dan
Shiebler, Daniel, Daniel Hnyk, David Ellis, David Nicholson, David Staub, David
Thaler, David Warshaw, Davide Lasagna, Deborah, definitelyuncertain, Didi
Bar-Zev, djipey, dsquareindia, edwinENSAE, Elias Kuthe, Elvis DOHMATOB, Ethan
White, Fabian Pedregosa, Fabio Ticconi, fisache, Florian Wilhelm, Francis,
Francis O’Donovan, Gael Varoquaux, Ganiev Ibraim, ghg, Gilles Louppe, Giorgio
Patrini, Giovanni Cherubin, Giovanni Lanzani, Glenn Qian, Gordon
Mohr, govin-vatsan, Graham Clenaghan, Greg Reda, Greg Stupp, Guillaume
Lemaitre, Gustav Mörtberg, halwai, Harizo Rajaona, Harry Mavroforakis,
hashcode55, hdmetor, Henry Lin, Hobson Lane, Hugo Bowne-Anderson,
Igor Andriushchenko, Imaculate, Inki Hwang, Isaac Sijaranamual,
Ishank Gulati, Issam Laradji, Iver Jordal, jackmartin, Jacob Schreiber, Jake
Vanderplas, James Fiedler, James Routley, Jan Zikes, Janna Brettingen, jarfa, Jason
Laska, jblackburne, jeff levesque, Jeffrey Blackburne, Jeffrey04, Jeremy Hintz,
jeremynixon, Jeroen, Jessica Yung, Jill-Jênn Vie, Jimmy Jia, Jiyuan Qian, Joel
Nothman, johannah, John, John Boersma, John Kirkham, John Moeller,
jonathan.striebel, joncrall, Jordi, Joseph Munoz, Joshua Cook, JPFrancoia,
jrfiedler, JulianKahnert, juliathebrave, kaichogami, KamalakerDadi, Kenneth
Lyons, Kevin Wang, kingjr, kjell, Konstantin Podshumok, Kornel Kielczewski,
Krishna Kalyan, krishnakalyan3, Kvle Putnam, Kyle Jackson, Lars Buitinck,
ldavid, LeiG, LeightonZhang, Leland McInnes, Liang-Chi Hsieh, Lilian Besson,
lizsz, Loic Esteve, Louis Tiao, Léonie Borne, Mads Jensen, Maniteja Nandana,
Manoj Kumar, Manvendra Singh, Marco, Mario Krell, Mark Bao, Mark Szepieniec,
Martin Madsen, MartinBpr, MaryanMorel, Massil, Matheus, Mathieu Blondel,
Mathieu Dubois, Matteo, Matthias Ekman, Max Moroz, Michael Scherer, michiaki
ariga, Mikhail Korobov, Moussa Taifi, mrandrewandrade, Mridul Seth, nadya-p,
Naoya Kanai, Nate George, Nelle Varoquaux, Nelson Liu, Nick James,
NickleDave, Nico, Nicolas Goix, Nikolay Mayorov, ningchi, nlathia,
okbalefthanded, Okhlopkov, Olivier Grisel, Panos Louridas, Paul Strickland,
Perrine Letellier, pestrickland, Peter Fischer, Pieter, Ping-Yao, Chang,
practicalswift, Preston Parry, Qimu Zheng, Rachit Kansal, Raghav RV,
Ralf Gommers, Ramana.S, Rammig, Randy Olson, Rob Alexander, Robert Lutz,
Robin Schucker, Rohan Jain, Ruifeng Zheng, Ryan Yu, Rémy Léone, saihttam,
Saiwing Yeung, Sam Shleifer, Samuel St-Jean, Sartaj Singh, Sasank Chilamkurthy,
saurabh.bansod, Scott Andrews, Scott Lowe, seales, Sebastian Raschka, Sebastian
Saeger, Sebastián Vanrell, Sergei Lebedev, shagun Sodhani, shanmuga cv,
Shashank Shekhar, shawpan, shengxiduan, Shota, shuckle16, Skipper Seabold,
sklearn-ci, SmedbergM, srvanrell, Sébastien Lerique, Taranjeet, themrmax,
Thierry, Thierry Guillemot, Thomas, Thomas Hallock, Thomas Moreau, Tim Head,
tKammy, toastedcornflakes, Tom, TomDLT, Toshihiro Kamishima, tracer0tong, Trent
Hauck, trevorstephens, Tue Vo, Varun, Varun Jewalikar, Viacheslav, Vighnesh
Birodkar, Vikram, Villu Ruusmann, Vinayak Mehta, walter, waterponey, Wenhua
Yang, Wenjian Huang, Will Welch, wyseguy7, xyguo, yanlend, Yaroslav Halchenko,
yelite, Yen, YenChenLin, Yichuan Liu, Yoav Ram, Yoshiki, Zheng RuiFeng, zivori, Óscar Nájera</p>
</div>
</div>


      </div>
    <div class="container">
      <footer class="sk-content-footer">
            &copy; 2007 - 2019, scikit-learn developers (BSD License).
          <a href="../_sources/whats_new/v0.18.rst.txt" rel="nofollow">Show this page source</a>
      </footer>
    </div>
  </div>
</div>
<script src="../_static/js/vendor/bootstrap.min.js"></script>

<script>
    window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
    ga('create', 'UA-22606712-2', 'auto');
    ga('set', 'anonymizeIp', true);
    ga('send', 'pageview');
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>


<script>
$(document).ready(function() {
    /* Add a [>>>] button on the top-right corner of code samples to hide
     * the >>> and ... prompts and the output and thus make the code
     * copyable. */
    var div = $('.highlight-python .highlight,' +
                '.highlight-python3 .highlight,' +
                '.highlight-pycon .highlight,' +
		'.highlight-default .highlight')
    var pre = div.find('pre');

    // get the styles from the current theme
    pre.parent().parent().css('position', 'relative');
    var hide_text = 'Hide prompts and outputs';
    var show_text = 'Show prompts and outputs';

    // create and add the button to all the code blocks that contain >>>
    div.each(function(index) {
        var jthis = $(this);
        if (jthis.find('.gp').length > 0) {
            var button = $('<span class="copybutton">&gt;&gt;&gt;</span>');
            button.attr('title', hide_text);
            button.data('hidden', 'false');
            jthis.prepend(button);
        }
        // tracebacks (.gt) contain bare text elements that need to be
        // wrapped in a span to work with .nextUntil() (see later)
        jthis.find('pre:has(.gt)').contents().filter(function() {
            return ((this.nodeType == 3) && (this.data.trim().length > 0));
        }).wrap('<span>');
    });

    // define the behavior of the button when it's clicked
    $('.copybutton').click(function(e){
        e.preventDefault();
        var button = $(this);
        if (button.data('hidden') === 'false') {
            // hide the code output
            button.parent().find('.go, .gp, .gt').hide();
            button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'hidden');
            button.css('text-decoration', 'line-through');
            button.attr('title', show_text);
            button.data('hidden', 'true');
        } else {
            // show the code output
            button.parent().find('.go, .gp, .gt').show();
            button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'visible');
            button.css('text-decoration', 'none');
            button.attr('title', hide_text);
            button.data('hidden', 'false');
        }
    });

	/*** Add permalink buttons next to glossary terms ***/
	$('dl.glossary > dt[id]').append(function() {
		return ('<a class="headerlink" href="#' +
			    this.getAttribute('id') +
			    '" title="Permalink to this term">¶</a>');
	});
  /*** Hide navbar when scrolling down ***/
  // Returns true when headerlink target matches hash in url
  (function() {
    hashTargetOnTop = function() {
        var hash = window.location.hash;
        if ( hash.length < 2 ) { return false; }

        var target = document.getElementById( hash.slice(1) );
        if ( target === null ) { return false; }

        var top = target.getBoundingClientRect().top;
        return (top < 2) && (top > -2);
    };

    // Hide navbar on load if hash target is on top
    var navBar = document.getElementById("navbar");
    var navBarToggler = document.getElementById("sk-navbar-toggler");
    var navBarHeightHidden = "-" + navBar.getBoundingClientRect().height + "px";
    var $window = $(window);

    hideNavBar = function() {
        navBar.style.top = navBarHeightHidden;
    };

    showNavBar = function() {
        navBar.style.top = "0";
    }

    if (hashTargetOnTop()) {
        hideNavBar()
    }

    var prevScrollpos = window.pageYOffset;
    hideOnScroll = function(lastScrollTop) {
        if (($window.width() < 768) && (navBarToggler.getAttribute("aria-expanded") === 'true')) {
            return;
        }
        if (lastScrollTop > 2 && (prevScrollpos <= lastScrollTop) || hashTargetOnTop()){
            hideNavBar()
        } else {
            showNavBar()
        }
        prevScrollpos = lastScrollTop;
    };

    /*** high preformance scroll event listener***/
    var raf = window.requestAnimationFrame ||
        window.webkitRequestAnimationFrame ||
        window.mozRequestAnimationFrame ||
        window.msRequestAnimationFrame ||
        window.oRequestAnimationFrame;
    var lastScrollTop = $window.scrollTop();

    if (raf) {
        loop();
    }

    function loop() {
        var scrollTop = $window.scrollTop();
        if (lastScrollTop === scrollTop) {
            raf(loop);
            return;
        } else {
            lastScrollTop = scrollTop;
            hideOnScroll(lastScrollTop);
            raf(loop);
        }
    }
  })();
});

</script>
    
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
    
</body>
</html>